triu — upper triangular matrix
triu
returns the upper triangular part of the argument matrix.
If no scalar argument is present, this is all the terms on the main diagonal
and above. The remainder of the matrix is set to zero. If the optional
scalar argument is present, then it specifies the diagonal to use instead
of the main diagonal. The convention used is that positive values are
above the main diagonal, negative values are below the main diagonal, and
zero is the main diagonal.
This is not an built-in function. This function
is normally loaded on start-up from the triu.r
file in the
standard rlib
directory. Use of the -r
option, incorrectly
setting the RLAB_LIB_DIR
environmental variable, or modifying
triu.r
may make this function unavailable.
Subsections